package com.itheima.stock;

import com.itheima.stock.common.domain.StockInfoConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author by itheima
 * @Date 2021/12/29
 * @Description 定义main启动类
 */
@SpringBootApplication
@MapperScan("com.itheima.stock.mapper")
@EnableConfigurationProperties(StockInfoConfig.class)
public class StockApp {
    public static void main(String[] args) {
        SpringApplication.run(StockApp.class, args);
        //ConfigurableApplicationContext ac = SpringApplication.run(StockApp.class, args);
        //StockInfoConfig config = ac.getBean(StockInfoConfig.class);
        //for (String str : config.getInner()) {
        //    System.out.println(str);
        //}
    }

    /**
     * 创建ResetTemplate对象
     * @return
     */
//    @Bean
//    public RestTemplate createResetTemplate(){
//        return new RestTemplate();
//    }

}